<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
  <meta name="copyright" content=
  "Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
  <title>Understanding the comparison</title>
</head>
<body bgcolor="#FFFFFF">
  <h1>Understanding the comparison</h1>
  <p>If you compare two files (file1.txt and file2.txt), the following results are shown in the compare editor. The
  left side shows the contents of file1.txt and the right side shows the contents of file2.txt. The lines connecting
  the left and right panes indicate the differences between the files.</p>
  <p>You can double click on the editor tab to maximize the editor.</p>
  <p><img src="../images/Image80_compare_editor2.png" alt="Compare view" border="0"></p>
  <p>Looking at the numbered changes in the above image:</p>
  <ul>
    <li>Starting with the top line (in the left pane) we can see that the difference bar (in the area of the blue
    circle) indicates something is missing from the very top of the left file. If we follow the difference band (see
    #1) to the right file we can see that it contains "This is line 1" .</li>
    <li>The next line "This is line 2." is white indicating it matches the right file.</li>
    <li>Moving onto the next line (colored in gray) we can see that the left file and right file have different
    contents for this line (see #2).Also, you can observe that a part of the line is highlighted. You can turn this
    option off on the <a class="command-link" href=
    'javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.compare.internal.ComparePreferencePage)")'>
    <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>General &gt; Compare/Patch</b></a>
    preference page.</li>
    <li>The next line ("This is line 4") is once again in white, so we can skip it, since the contents are the same in
    both.</li>
    <li>The next line exists in the left file but since it is gray we follow its difference bar to the right (see #3)
    and notice that the right file does not contain the line (see red circle).</li>
  </ul>
  <p><em>Hint:</em> On the right-hand side of the comparison, to the right of the scrollbar, there is a column which
  shows a graphical representation of all differences between the resources. You can click on any of the segments
  displayed there to quickly scroll to that difference.</p>
  <h3 class="related">Related concepts</h3>
  <a href="../concepts/concepts-29.htm">Three way comparisons</a><br>
  <a href="../concepts/concepts-17a.htm">Local history</a>
  <h3 class="related">Related tasks</h3><a href="tasks-68.htm">Comparing resources</a><br>
  <a href="tasks-115.htm">Synchronizing with the repository</a><br>
  <a href="tasks-68dg.htm">Merging changes in the Compare editor</a><br>
  <a href="tasks-113b.htm">Resolving conflicts</a><br>
  <a href="tasks-68b.htm">Setting preferences for comparing files</a><br>
  <a href="tasks-101.htm">Comparing resources with repository versions</a><br>
  <a href="tasks-3g.htm">Tiling editors</a>
  <h3 class="related">Related reference</h3><a href="../reference/ref-25.htm">Compare editor</a><br>
  <a href="../reference/ref-11.htm">Compare/Patch preferences</a>
</body>
</html>
